<template>
    <div>
        <component :is="comp"></component>
    </div>
</template>
<script setup lang="ts">
import { isVNode } from 'vue';
import { useRouter } from './index'
import { computed } from 'vue'
const route = useRouter()
const comp = computed(() => {
    const curRoute = route.routes.find(v => v.path === route.current.value)
    return curRoute ? curRoute.component : null
})
</script>